3.6.59 \(\int \frac {(a+b x+c x^2)^3}{(d+e x) (f+g x)} \, dx\)

Optimal. Leaf size=531 \[ -\frac {x \left (-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (d g+e f)+b^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )+b^2 e^3 g^3 (-3 a e g+b d g+b e f)-3 c^2 e g \left (a e g \left (d^2 g^2+d e f g+e^2 f^2\right )-b \left (d^3 g^3+d^2 e f g^2+d e^2 f^2 g+e^3 f^3\right )\right )-\left (c^3 \left (d^4 g^4+d^3 e f g^3+d^2 e^2 f^2 g^2+d e^3 f^3 g+e^4 f^4\right )\right )\right )}{e^5 g^5}+\frac {x^2 \left (-3 c^2 e g \left (a e g (d g+e f)-b \left (d^2 g^2+d e f g+e^2 f^2\right )\right )-3 b c e^2 g^2 (-2 a e g+b d g+b e f)+b^3 e^3 g^3-\left (c^3 \left (d^3 g^3+d^2 e f g^2+d e^2 f^2 g+e^3 f^3\right )\right )\right )}{2 e^4 g^4}+\frac {c x^3 \left (-3 c e g (-a e g+b d g+b e f)+3 b^2 e^2 g^2+c^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )}{3 e^3 g^3}+\frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )^3}{e^6 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )^3}{g^6 (e f-d g)}-\frac {c^2 x^4 (-3 b e g+c d g+c e f)}{4 e^2 g^2}+\frac {c^3 x^5}{5 e g} \]

________________________________________________________________________________________

Rubi [A]  time = 0.99, antiderivative size = 531, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.037, Rules used = {893} \begin {gather*} -\frac {x \left (-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (d g+e f)+b^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )+b^2 e^3 g^3 (-3 a e g+b d g+b e f)-3 c^2 e g \left (a e g \left (d^2 g^2+d e f g+e^2 f^2\right )-b \left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )+c^3 \left (-\left (d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4+d e^3 f^3 g+e^4 f^4\right )\right )\right )}{e^5 g^5}+\frac {c x^3 \left (-3 c e g (-a e g+b d g+b e f)+3 b^2 e^2 g^2+c^2 \left (d^2 g^2+d e f g+e^2 f^2\right )\right )}{3 e^3 g^3}+\frac {x^2 \left (-3 c^2 e g \left (a e g (d g+e f)-b \left (d^2 g^2+d e f g+e^2 f^2\right )\right )-3 b c e^2 g^2 (-2 a e g+b d g+b e f)+b^3 e^3 g^3+c^3 \left (-\left (d^2 e f g^2+d^3 g^3+d e^2 f^2 g+e^3 f^3\right )\right )\right )}{2 e^4 g^4}+\frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )^3}{e^6 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )^3}{g^6 (e f-d g)}-\frac {c^2 x^4 (-3 b e g+c d g+c e f)}{4 e^2 g^2}+\frac {c^3 x^5}{5 e g} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x + c*x^2)^3/((d + e*x)*(f + g*x)),x]

[Out]

-(((b^2*e^3*g^3*(b*e*f + b*d*g - 3*a*e*g) - c^3*(e^4*f^4 + d*e^3*f^3*g + d^2*e^2*f^2*g^2 + d^3*e*f*g^3 + d^4*g
^4) - 3*c*e^2*g^2*(a^2*e^2*g^2 - 2*a*b*e*g*(e*f + d*g) + b^2*(e^2*f^2 + d*e*f*g + d^2*g^2)) - 3*c^2*e*g*(a*e*g
*(e^2*f^2 + d*e*f*g + d^2*g^2) - b*(e^3*f^3 + d*e^2*f^2*g + d^2*e*f*g^2 + d^3*g^3)))*x)/(e^5*g^5)) + ((b^3*e^3
*g^3 - 3*b*c*e^2*g^2*(b*e*f + b*d*g - 2*a*e*g) - c^3*(e^3*f^3 + d*e^2*f^2*g + d^2*e*f*g^2 + d^3*g^3) - 3*c^2*e
*g*(a*e*g*(e*f + d*g) - b*(e^2*f^2 + d*e*f*g + d^2*g^2)))*x^2)/(2*e^4*g^4) + (c*(3*b^2*e^2*g^2 - 3*c*e*g*(b*e*
f + b*d*g - a*e*g) + c^2*(e^2*f^2 + d*e*f*g + d^2*g^2))*x^3)/(3*e^3*g^3) - (c^2*(c*e*f + c*d*g - 3*b*e*g)*x^4)
/(4*e^2*g^2) + (c^3*x^5)/(5*e*g) + ((c*d^2 - b*d*e + a*e^2)^3*Log[d + e*x])/(e^6*(e*f - d*g)) - ((c*f^2 - b*f*
g + a*g^2)^3*Log[f + g*x])/(g^6*(e*f - d*g))

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rubi steps

\begin {align*} \int \frac {\left (a+b x+c x^2\right )^3}{(d+e x) (f+g x)} \, dx &=\int \left (\frac {-b^2 e^3 g^3 (b e f+b d g-3 a e g)+c^3 \left (e^4 f^4+d e^3 f^3 g+d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4\right )+3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (e f+d g)+b^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right )+3 c^2 e g \left (a e g \left (e^2 f^2+d e f g+d^2 g^2\right )-b \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )\right )}{e^5 g^5}+\frac {\left (b^3 e^3 g^3-3 b c e^2 g^2 (b e f+b d g-2 a e g)-c^3 \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )-3 c^2 e g \left (a e g (e f+d g)-b \left (e^2 f^2+d e f g+d^2 g^2\right )\right )\right ) x}{e^4 g^4}+\frac {c \left (3 b^2 e^2 g^2-3 c e g (b e f+b d g-a e g)+c^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right ) x^2}{e^3 g^3}-\frac {c^2 (c e f+c d g-3 b e g) x^3}{e^2 g^2}+\frac {c^3 x^4}{e g}+\frac {\left (c d^2-b d e+a e^2\right )^3}{e^5 (e f-d g) (d+e x)}+\frac {\left (c f^2-b f g+a g^2\right )^3}{g^5 (-e f+d g) (f+g x)}\right ) \, dx\\ &=-\frac {\left (b^2 e^3 g^3 (b e f+b d g-3 a e g)-c^3 \left (e^4 f^4+d e^3 f^3 g+d^2 e^2 f^2 g^2+d^3 e f g^3+d^4 g^4\right )-3 c e^2 g^2 \left (a^2 e^2 g^2-2 a b e g (e f+d g)+b^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right )-3 c^2 e g \left (a e g \left (e^2 f^2+d e f g+d^2 g^2\right )-b \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )\right )\right ) x}{e^5 g^5}+\frac {\left (b^3 e^3 g^3-3 b c e^2 g^2 (b e f+b d g-2 a e g)-c^3 \left (e^3 f^3+d e^2 f^2 g+d^2 e f g^2+d^3 g^3\right )-3 c^2 e g \left (a e g (e f+d g)-b \left (e^2 f^2+d e f g+d^2 g^2\right )\right )\right ) x^2}{2 e^4 g^4}+\frac {c \left (3 b^2 e^2 g^2-3 c e g (b e f+b d g-a e g)+c^2 \left (e^2 f^2+d e f g+d^2 g^2\right )\right ) x^3}{3 e^3 g^3}-\frac {c^2 (c e f+c d g-3 b e g) x^4}{4 e^2 g^2}+\frac {c^3 x^5}{5 e g}+\frac {\left (c d^2-b d e+a e^2\right )^3 \log (d+e x)}{e^6 (e f-d g)}-\frac {\left (c f^2-b f g+a g^2\right )^3 \log (f+g x)}{g^6 (e f-d g)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.42, size = 476, normalized size = 0.90 \begin {gather*} -\frac {e g x \left (-30 c e^2 g^2 (e f-d g) \left (6 a^2 e^2 g^2+6 a b e g (-2 d g-2 e f+e g x)+b^2 \left (6 d^2 g^2-3 d e g (g x-2 f)+e^2 \left (6 f^2-3 f g x+2 g^2 x^2\right )\right )\right )-30 b^2 e^3 g^3 (e f-d g) (6 a e g+b (-2 d g-2 e f+e g x))+15 c^2 e g \left (b \left (-12 d^4 g^4+6 d^3 e g^4 x-4 d^2 e^2 g^4 x^2+3 d e^3 g^4 x^3+e^4 f \left (12 f^3-6 f^2 g x+4 f g^2 x^2-3 g^3 x^3\right )\right )-2 a e g (e f-d g) \left (6 d^2 g^2-3 d e g (g x-2 f)+e^2 \left (6 f^2-3 f g x+2 g^2 x^2\right )\right )\right )+c^3 \left (60 d^5 g^5-30 d^4 e g^5 x+20 d^3 e^2 g^5 x^2-15 d^2 e^3 g^5 x^3+12 d e^4 g^5 x^4+e^5 f \left (-60 f^4+30 f^3 g x-20 f^2 g^2 x^2+15 f g^3 x^3-12 g^4 x^4\right )\right )\right )-60 g^6 \log (d+e x) \left (e (a e-b d)+c d^2\right )^3+60 e^6 \log (f+g x) \left (g (a g-b f)+c f^2\right )^3}{60 e^6 g^6 (e f-d g)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x + c*x^2)^3/((d + e*x)*(f + g*x)),x]

[Out]

-1/60*(e*g*x*(-30*b^2*e^3*g^3*(e*f - d*g)*(6*a*e*g + b*(-2*e*f - 2*d*g + e*g*x)) + c^3*(60*d^5*g^5 - 30*d^4*e*
g^5*x + 20*d^3*e^2*g^5*x^2 - 15*d^2*e^3*g^5*x^3 + 12*d*e^4*g^5*x^4 + e^5*f*(-60*f^4 + 30*f^3*g*x - 20*f^2*g^2*
x^2 + 15*f*g^3*x^3 - 12*g^4*x^4)) - 30*c*e^2*g^2*(e*f - d*g)*(6*a^2*e^2*g^2 + 6*a*b*e*g*(-2*e*f - 2*d*g + e*g*
x) + b^2*(6*d^2*g^2 - 3*d*e*g*(-2*f + g*x) + e^2*(6*f^2 - 3*f*g*x + 2*g^2*x^2))) + 15*c^2*e*g*(-2*a*e*g*(e*f -
 d*g)*(6*d^2*g^2 - 3*d*e*g*(-2*f + g*x) + e^2*(6*f^2 - 3*f*g*x + 2*g^2*x^2)) + b*(-12*d^4*g^4 + 6*d^3*e*g^4*x
- 4*d^2*e^2*g^4*x^2 + 3*d*e^3*g^4*x^3 + e^4*f*(12*f^3 - 6*f^2*g*x + 4*f*g^2*x^2 - 3*g^3*x^3)))) - 60*(c*d^2 +
e*(-(b*d) + a*e))^3*g^6*Log[d + e*x] + 60*e^6*(c*f^2 + g*(-(b*f) + a*g))^3*Log[f + g*x])/(e^6*g^6*(e*f - d*g))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a+b x+c x^2\right )^3}{(d+e x) (f+g x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x + c*x^2)^3/((d + e*x)*(f + g*x)),x]

[Out]

IntegrateAlgebraic[(a + b*x + c*x^2)^3/((d + e*x)*(f + g*x)), x]

________________________________________________________________________________________

fricas [A]  time = 3.90, size = 736, normalized size = 1.39 \begin {gather*} \frac {60 \, {\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e - 3 \, a^{2} b d e^{5} + a^{3} e^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{4} e^{2} - {\left (b^{3} + 6 \, a b c\right )} d^{3} e^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} d^{2} e^{4}\right )} g^{6} \log \left (e x + d\right ) + 12 \, {\left (c^{3} e^{6} f g^{5} - c^{3} d e^{5} g^{6}\right )} x^{5} - 15 \, {\left (c^{3} e^{6} f^{2} g^{4} - 3 \, b c^{2} e^{6} f g^{5} - {\left (c^{3} d^{2} e^{4} - 3 \, b c^{2} d e^{5}\right )} g^{6}\right )} x^{4} + 20 \, {\left (c^{3} e^{6} f^{3} g^{3} - 3 \, b c^{2} e^{6} f^{2} g^{4} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f g^{5} - {\left (c^{3} d^{3} e^{3} - 3 \, b c^{2} d^{2} e^{4} + 3 \, {\left (b^{2} c + a c^{2}\right )} d e^{5}\right )} g^{6}\right )} x^{3} - 30 \, {\left (c^{3} e^{6} f^{4} g^{2} - 3 \, b c^{2} e^{6} f^{3} g^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f^{2} g^{4} - {\left (b^{3} + 6 \, a b c\right )} e^{6} f g^{5} - {\left (c^{3} d^{4} e^{2} - 3 \, b c^{2} d^{3} e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{2} e^{4} - {\left (b^{3} + 6 \, a b c\right )} d e^{5}\right )} g^{6}\right )} x^{2} + 60 \, {\left (c^{3} e^{6} f^{5} g - 3 \, b c^{2} e^{6} f^{4} g^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f^{3} g^{3} - {\left (b^{3} + 6 \, a b c\right )} e^{6} f^{2} g^{4} + 3 \, {\left (a b^{2} + a^{2} c\right )} e^{6} f g^{5} - {\left (c^{3} d^{5} e - 3 \, b c^{2} d^{4} e^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{3} e^{3} - {\left (b^{3} + 6 \, a b c\right )} d^{2} e^{4} + 3 \, {\left (a b^{2} + a^{2} c\right )} d e^{5}\right )} g^{6}\right )} x - 60 \, {\left (c^{3} e^{6} f^{6} - 3 \, b c^{2} e^{6} f^{5} g - 3 \, a^{2} b e^{6} f g^{5} + a^{3} e^{6} g^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{6} f^{4} g^{2} - {\left (b^{3} + 6 \, a b c\right )} e^{6} f^{3} g^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} e^{6} f^{2} g^{4}\right )} \log \left (g x + f\right )}{60 \, {\left (e^{7} f g^{6} - d e^{6} g^{7}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)^3/(e*x+d)/(g*x+f),x, algorithm="fricas")

[Out]

1/60*(60*(c^3*d^6 - 3*b*c^2*d^5*e - 3*a^2*b*d*e^5 + a^3*e^6 + 3*(b^2*c + a*c^2)*d^4*e^2 - (b^3 + 6*a*b*c)*d^3*
e^3 + 3*(a*b^2 + a^2*c)*d^2*e^4)*g^6*log(e*x + d) + 12*(c^3*e^6*f*g^5 - c^3*d*e^5*g^6)*x^5 - 15*(c^3*e^6*f^2*g
^4 - 3*b*c^2*e^6*f*g^5 - (c^3*d^2*e^4 - 3*b*c^2*d*e^5)*g^6)*x^4 + 20*(c^3*e^6*f^3*g^3 - 3*b*c^2*e^6*f^2*g^4 +
3*(b^2*c + a*c^2)*e^6*f*g^5 - (c^3*d^3*e^3 - 3*b*c^2*d^2*e^4 + 3*(b^2*c + a*c^2)*d*e^5)*g^6)*x^3 - 30*(c^3*e^6
*f^4*g^2 - 3*b*c^2*e^6*f^3*g^3 + 3*(b^2*c + a*c^2)*e^6*f^2*g^4 - (b^3 + 6*a*b*c)*e^6*f*g^5 - (c^3*d^4*e^2 - 3*
b*c^2*d^3*e^3 + 3*(b^2*c + a*c^2)*d^2*e^4 - (b^3 + 6*a*b*c)*d*e^5)*g^6)*x^2 + 60*(c^3*e^6*f^5*g - 3*b*c^2*e^6*
f^4*g^2 + 3*(b^2*c + a*c^2)*e^6*f^3*g^3 - (b^3 + 6*a*b*c)*e^6*f^2*g^4 + 3*(a*b^2 + a^2*c)*e^6*f*g^5 - (c^3*d^5
*e - 3*b*c^2*d^4*e^2 + 3*(b^2*c + a*c^2)*d^3*e^3 - (b^3 + 6*a*b*c)*d^2*e^4 + 3*(a*b^2 + a^2*c)*d*e^5)*g^6)*x -
 60*(c^3*e^6*f^6 - 3*b*c^2*e^6*f^5*g - 3*a^2*b*e^6*f*g^5 + a^3*e^6*g^6 + 3*(b^2*c + a*c^2)*e^6*f^4*g^2 - (b^3
+ 6*a*b*c)*e^6*f^3*g^3 + 3*(a*b^2 + a^2*c)*e^6*f^2*g^4)*log(g*x + f))/(e^7*f*g^6 - d*e^6*g^7)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 907, normalized size = 1.71 \begin {gather*} \frac {{\left (c^{3} f^{6} - 3 \, b c^{2} f^{5} g + 3 \, b^{2} c f^{4} g^{2} + 3 \, a c^{2} f^{4} g^{2} - b^{3} f^{3} g^{3} - 6 \, a b c f^{3} g^{3} + 3 \, a b^{2} f^{2} g^{4} + 3 \, a^{2} c f^{2} g^{4} - 3 \, a^{2} b f g^{5} + a^{3} g^{6}\right )} \log \left ({\left | g x + f \right |}\right )}{d g^{7} - f g^{6} e} - \frac {{\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e + 3 \, b^{2} c d^{4} e^{2} + 3 \, a c^{2} d^{4} e^{2} - b^{3} d^{3} e^{3} - 6 \, a b c d^{3} e^{3} + 3 \, a b^{2} d^{2} e^{4} + 3 \, a^{2} c d^{2} e^{4} - 3 \, a^{2} b d e^{5} + a^{3} e^{6}\right )} \log \left ({\left | x e + d \right |}\right )}{d g e^{6} - f e^{7}} + \frac {{\left (12 \, c^{3} g^{4} x^{5} e^{4} - 15 \, c^{3} d g^{4} x^{4} e^{3} + 20 \, c^{3} d^{2} g^{4} x^{3} e^{2} - 30 \, c^{3} d^{3} g^{4} x^{2} e + 60 \, c^{3} d^{4} g^{4} x - 15 \, c^{3} f g^{3} x^{4} e^{4} + 45 \, b c^{2} g^{4} x^{4} e^{4} + 20 \, c^{3} d f g^{3} x^{3} e^{3} - 60 \, b c^{2} d g^{4} x^{3} e^{3} - 30 \, c^{3} d^{2} f g^{3} x^{2} e^{2} + 90 \, b c^{2} d^{2} g^{4} x^{2} e^{2} + 60 \, c^{3} d^{3} f g^{3} x e - 180 \, b c^{2} d^{3} g^{4} x e + 20 \, c^{3} f^{2} g^{2} x^{3} e^{4} - 60 \, b c^{2} f g^{3} x^{3} e^{4} + 60 \, b^{2} c g^{4} x^{3} e^{4} + 60 \, a c^{2} g^{4} x^{3} e^{4} - 30 \, c^{3} d f^{2} g^{2} x^{2} e^{3} + 90 \, b c^{2} d f g^{3} x^{2} e^{3} - 90 \, b^{2} c d g^{4} x^{2} e^{3} - 90 \, a c^{2} d g^{4} x^{2} e^{3} + 60 \, c^{3} d^{2} f^{2} g^{2} x e^{2} - 180 \, b c^{2} d^{2} f g^{3} x e^{2} + 180 \, b^{2} c d^{2} g^{4} x e^{2} + 180 \, a c^{2} d^{2} g^{4} x e^{2} - 30 \, c^{3} f^{3} g x^{2} e^{4} + 90 \, b c^{2} f^{2} g^{2} x^{2} e^{4} - 90 \, b^{2} c f g^{3} x^{2} e^{4} - 90 \, a c^{2} f g^{3} x^{2} e^{4} + 30 \, b^{3} g^{4} x^{2} e^{4} + 180 \, a b c g^{4} x^{2} e^{4} + 60 \, c^{3} d f^{3} g x e^{3} - 180 \, b c^{2} d f^{2} g^{2} x e^{3} + 180 \, b^{2} c d f g^{3} x e^{3} + 180 \, a c^{2} d f g^{3} x e^{3} - 60 \, b^{3} d g^{4} x e^{3} - 360 \, a b c d g^{4} x e^{3} + 60 \, c^{3} f^{4} x e^{4} - 180 \, b c^{2} f^{3} g x e^{4} + 180 \, b^{2} c f^{2} g^{2} x e^{4} + 180 \, a c^{2} f^{2} g^{2} x e^{4} - 60 \, b^{3} f g^{3} x e^{4} - 360 \, a b c f g^{3} x e^{4} + 180 \, a b^{2} g^{4} x e^{4} + 180 \, a^{2} c g^{4} x e^{4}\right )} e^{\left (-5\right )}}{60 \, g^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)^3/(e*x+d)/(g*x+f),x, algorithm="giac")

[Out]

(c^3*f^6 - 3*b*c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*f*g^3*x
^2*e^4 + 30*b^3*g^4*x^2*e^4 + 180*a*b*c*g^4*x^2*e^4 + 60*c^3*d*f^3*g*x*e^3 - 180*b*c^2*d*f^2*g^2*x*e^3 + 180*b
^2*c*d*f*g^3*x*e^3 + 180*a*c^2*d*f*g^3*x*e^3 - 60*b^3*d*g^4*x*e^3 - 360*a*b*c*d*g^4*x*e^3 + 60*c^3*f^4*x*e^4 -
 180*b*c^2*f^3*g*x*e^4 + 180*b^2*c*f^2*g^2*x*e^4 + 180*a*c^2*f^2*g^2*x*e^4 - 60*b^3*f*g^3*x*e^4 - 360*a*b*c*f*
g^3*x*e^4 + 180*a*b^2*g^4*x*e^4 + 180*a^2*c*g^4*x*e^4)*e^(-5)/g^5

________________________________________________________________________________________

maple [B]  time = 0.02, size = 1232, normalized size = 2.32

result too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*x^2+b*x+a)^3/(e*x+d)/(g*x+f),x)

[Out]

1/5*c^3*x^5/e/g+1/2/g/e*x^2*b^3-6/g/e^2*a*b*c*d*x-6/g^2/e*a*b*c*f*x+3/g^2/e^2*a*c^2*d*f*x+3/g^2/e^2*b^2*c*d*f*
x-3/g^2/e^3*b*c^2*d^2*f*x-6/g^3/(d*g-e*f)*ln(g*x+f)*a*b*c*f^3+6/e^3/(d*g-e*f)*ln(e*x+d)*a*b*c*d^3+1/(d*g-e*f)*
ln(g*x+f)*a^3-1/(d*g-e*f)*ln(e*x+d)*a^3-3/g/(d*g-e*f)*ln(g*x+f)*a^2*b*f+3/e/(d*g-e*f)*ln(e*x+d)*a^2*b*d-3/e^2/
(d*g-e*f)*ln(e*x+d)*a^2*c*d^2-3/e^2/(d*g-e*f)*ln(e*x+d)*a*b^2*d^2-3/e^4/(d*g-e*f)*ln(e*x+d)*a*c^2*d^4-3/e^4/(d
*g-e*f)*ln(e*x+d)*b^2*c*d^4+3/e^5/(d*g-e*f)*ln(e*x+d)*b*c^2*d^5+3/2/g^3/e*x^2*b*c^2*f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
b*c^2*d^2-3/g^3/e^2*b*c^2*d*f^2*x+3/2/g^2/e^2*x^2*b*c^2*d*f

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 721, normalized size = 1.36 \begin {gather*} \frac {{\left (c^{3} d^{6} - 3 \, b c^{2} d^{5} e - 3 \, a^{2} b d e^{5} + a^{3} e^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{4} e^{2} - {\left (b^{3} + 6 \, a b c\right )} d^{3} e^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} d^{2} e^{4}\right )} \log \left (e x + d\right )}{e^{7} f - d e^{6} g} - \frac {{\left (c^{3} f^{6} - 3 \, b c^{2} f^{5} g - 3 \, a^{2} b f g^{5} + a^{3} g^{6} + 3 \, {\left (b^{2} c + a c^{2}\right )} f^{4} g^{2} - {\left (b^{3} + 6 \, a b c\right )} f^{3} g^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} f^{2} g^{4}\right )} \log \left (g x + f\right )}{e f g^{6} - d g^{7}} + \frac {12 \, c^{3} e^{4} g^{4} x^{5} - 15 \, {\left (c^{3} e^{4} f g^{3} + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} g^{4}\right )} x^{4} + 20 \, {\left (c^{3} e^{4} f^{2} g^{2} + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f g^{3} + {\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{4}\right )} g^{4}\right )} x^{3} - 30 \, {\left (c^{3} e^{4} f^{3} g + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f^{2} g^{2} + {\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{4}\right )} f g^{3} + {\left (c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} d e^{3} - {\left (b^{3} + 6 \, a b c\right )} e^{4}\right )} g^{4}\right )} x^{2} + 60 \, {\left (c^{3} e^{4} f^{4} + {\left (c^{3} d e^{3} - 3 \, b c^{2} e^{4}\right )} f^{3} g + {\left (c^{3} d^{2} e^{2} - 3 \, b c^{2} d e^{3} + 3 \, {\left (b^{2} c + a c^{2}\right )} e^{4}\right )} f^{2} g^{2} + {\left (c^{3} d^{3} e - 3 \, b c^{2} d^{2} e^{2} + 3 \, {\left (b^{2} c + a c^{2}\right )} d e^{3} - {\left (b^{3} + 6 \, a b c\right )} e^{4}\right )} f g^{3} + {\left (c^{3} d^{4} - 3 \, b c^{2} d^{3} e + 3 \, {\left (b^{2} c + a c^{2}\right )} d^{2} e^{2} - {\left (b^{3} + 6 \, a b c\right )} d e^{3} + 3 \, {\left (a b^{2} + a^{2} c\right )} e^{4}\right )} g^{4}\right )} x}{60 \, e^{5} g^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x^2+b*x+a)^3/(e*x+d)/(g*x+f),x, algorithm="maxima")

[Out]

(c^3*d^6 - 3*b*c^2*d^5*e - 3*a^2*b*d*e^5 + a^3*e^6 + 3*(b^2*c + a*c^2)*d^4*e^2 - (b^3 + 6*a*b*c)*d^3*e^3 + 3*(
a*b^2 + a^2*c)*d^2*e^4)*log(e*x + d)/(e^7*f - d*e^6*g) - (c^3*f^6 - 3*b*c^2*f^5*g - 3*a^2*b*f*g^5 + a^3*g^6 +
3*(b^2*c + a*c^2)*f^4*g^2 - (b^3 + 6*a*b*c)*f^3*g^3 + 3*(a*b^2 + a^2*c)*f^2*g^4)*log(g*x + f)/(e*f*g^6 - d*g^7
) + 1/60*(12*c^3*e^4*g^4*x^5 - 15*(c^3*e^4*f*g^3 + (c^3*d*e^3 - 3*b*c^2*e^4)*g^4)*x^4 + 20*(c^3*e^4*f^2*g^2 +
(c^3*d*e^3 - 3*b*c^2*e^4)*f*g^3 + (c^3*d^2*e^2 - 3*b*c^2*d*e^3 + 3*(b^2*c + a*c^2)*e^4)*g^4)*x^3 - 30*(c^3*e^4
*f^3*g + (c^3*d*e^3 - 3*b*c^2*e^4)*f^2*g^2 + (c^3*d^2*e^2 - 3*b*c^2*d*e^3 + 3*(b^2*c + a*c^2)*e^4)*f*g^3 + (c^
3*d^3*e - 3*b*c^2*d^2*e^2 + 3*(b^2*c + a*c^2)*d*e^3 - (b^3 + 6*a*b*c)*e^4)*g^4)*x^2 + 60*(c^3*e^4*f^4 + (c^3*d
*e^3 - 3*b*c^2*e^4)*f^3*g + (c^3*d^2*e^2 - 3*b*c^2*d*e^3 + 3*(b^2*c + a*c^2)*e^4)*f^2*g^2 + (c^3*d^3*e - 3*b*c
^2*d^2*e^2 + 3*(b^2*c + a*c^2)*d*e^3 - (b^3 + 6*a*b*c)*e^4)*f*g^3 + (c^3*d^4 - 3*b*c^2*d^3*e + 3*(b^2*c + a*c^
2)*d^2*e^2 - (b^3 + 6*a*b*c)*d*e^3 + 3*(a*b^2 + a^2*c)*e^4)*g^4)*x)/(e^5*g^5)

________________________________________________________________________________________

mupad [B]  time = 4.20, size = 794, normalized size = 1.50 \begin {gather*} x^4\,\left (\frac {3\,b\,c^2}{4\,e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{4\,e^2\,g^2}\right )-x^3\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{3\,e\,g}-\frac {c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{3\,e^2\,g^2}\right )+x^2\,\left (\frac {b^3+6\,a\,c\,b}{2\,e\,g}+\frac {\left (d\,g+e\,f\right )\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}-\frac {3\,c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{e^2\,g^2}\right )}{2\,e\,g}-\frac {d\,f\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{2\,e\,g}\right )+x\,\left (\frac {3\,a\,\left (b^2+a\,c\right )}{e\,g}-\frac {\left (d\,g+e\,f\right )\,\left (\frac {b^3+6\,a\,c\,b}{e\,g}+\frac {\left (d\,g+e\,f\right )\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}-\frac {3\,c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{e^2\,g^2}\right )}{e\,g}-\frac {d\,f\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}\right )}{e\,g}+\frac {d\,f\,\left (\frac {\left (d\,g+e\,f\right )\,\left (\frac {3\,b\,c^2}{e\,g}-\frac {c^3\,\left (d\,g+e\,f\right )}{e^2\,g^2}\right )}{e\,g}-\frac {3\,c\,\left (b^2+a\,c\right )}{e\,g}+\frac {c^3\,d\,f}{e^2\,g^2}\right )}{e\,g}\right )+\frac {\ln \left (d+e\,x\right )\,\left (e^4\,\left (3\,c\,a^2\,d^2+3\,a\,b^2\,d^2\right )+e^2\,\left (3\,b^2\,c\,d^4+3\,a\,c^2\,d^4\right )-e^3\,\left (b^3\,d^3+6\,a\,c\,b\,d^3\right )+a^3\,e^6+c^3\,d^6-3\,a^2\,b\,d\,e^5-3\,b\,c^2\,d^5\,e\right )}{e^7\,f-d\,e^6\,g}+\frac {\ln \left (f+g\,x\right )\,\left (g^4\,\left (3\,c\,a^2\,f^2+3\,a\,b^2\,f^2\right )+g^2\,\left (3\,b^2\,c\,f^4+3\,a\,c^2\,f^4\right )-g^3\,\left (b^3\,f^3+6\,a\,c\,b\,f^3\right )+a^3\,g^6+c^3\,f^6-3\,a^2\,b\,f\,g^5-3\,b\,c^2\,f^5\,g\right )}{d\,g^7-e\,f\,g^6}+\frac {c^3\,x^5}{5\,e\,g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x + c*x^2)^3/((f + g*x)*(d + e*x)),x)

[Out]

x^4*((3*b*c^2)/(4*e*g) - (c^3*(d*g + e*f))/(4*e^2*g^2)) - x^3*(((d*g + e*f)*((3*b*c^2)/(e*g) - (c^3*(d*g + e*f
))/(e^2*g^2)))/(3*e*g) - (c*(a*c + b^2))/(e*g) + (c^3*d*f)/(3*e^2*g^2)) + x^2*((b^3 + 6*a*b*c)/(2*e*g) + ((d*g
 + e*f)*(((d*g + e*f)*((3*b*c^2)/(e*g) - (c^3*(d*g + e*f))/(e^2*g^2)))/(e*g) - (3*c*(a*c + b^2))/(e*g) + (c^3*
d*f)/(e^2*g^2)))/(2*e*g) - (d*f*((3*b*c^2)/(e*g) - (c^3*(d*g + e*f))/(e^2*g^2)))/(2*e*g)) + x*((3*a*(a*c + b^2
))/(e*g) - ((d*g + e*f)*((b^3 + 6*a*b*c)/(e*g) + ((d*g + e*f)*(((d*g + e*f)*((3*b*c^2)/(e*g) - (c^3*(d*g + e*f
))/(e^2*g^2)))/(e*g) - (3*c*(a*c + b^2))/(e*g) + (c^3*d*f)/(e^2*g^2)))/(e*g) - (d*f*((3*b*c^2)/(e*g) - (c^3*(d
*g + e*f))/(e^2*g^2)))/(e*g)))/(e*g) + (d*f*(((d*g + e*f)*((3*b*c^2)/(e*g) - (c^3*(d*g + e*f))/(e^2*g^2)))/(e*
g) - (3*c*(a*c + b^2))/(e*g) + (c^3*d*f)/(e^2*g^2)))/(e*g)) + (log(d + e*x)*(e^4*(3*a*b^2*d^2 + 3*a^2*c*d^2) +
 e^2*(3*a*c^2*d^4 + 3*b^2*c*d^4) - e^3*(b^3*d^3 + 6*a*b*c*d^3) + a^3*e^6 + c^3*d^6 - 3*a^2*b*d*e^5 - 3*b*c^2*d
^5*e))/(e^7*f - d*e^6*g) + (log(f + g*x)*(g^4*(3*a*b^2*f^2 + 3*a^2*c*f^2) + g^2*(3*a*c^2*f^4 + 3*b^2*c*f^4) -
g^3*(b^3*f^3 + 6*a*b*c*f^3) + a^3*g^6 + c^3*f^6 - 3*a^2*b*f*g^5 - 3*b*c^2*f^5*g))/(d*g^7 - e*f*g^6) + (c^3*x^5
)/(5*e*g)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*x**2+b*x+a)**3/(e*x+d)/(g*x+f),x)

[Out]

Timed out

________________________________________________________________________________________